import { createPinia } from 'pinia';
import type { App } from 'vue';

// 引入持久化存储插件
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';

import { resetSetupStore } from './plugins';

export const setupStore = (app: App<Element>) => {
	const store = createPinia();
	store.use(piniaPluginPersistedstate);
	store.use(resetSetupStore);
	app.use(store);
};

export * from './modules';
